const mongoose = require("mongoose")
const {model, Schema} = mongoose
// 竞赛表
const schema = new Schema({
    name: {
        type: String
    },
    tel: {
        type: String
    },
    collegeName: {
        type: String
    },
    stage: {
        type: Number,
        default: 1
    },
    status: {
        type: Number,
        default: 0
    },
    raceType: {
        type: String,
        index: true
    },
    genre: {
        type: String,
        index: true
    },
    content: {
        type: String
    },
    img: {
        type: String
    },
    userName: {
        type: String
    },
    organizer: {
        type: Array
    },
    startDate: {
        type: Date
    },
    num: {
        type: Number,
        default: 0
    },
    createTime: {
        type: Date,
        default: new Date()
    },
    endDate: {
        type: Date
    },
    applyStartDate: {
        type: Date
    },
    applyEndDate: {
        type: Date
    }
})
const Contest = model("Contest", schema)
module.exports = Contest